package com.smedi.ismedi.personnel.core.domain.service;

import com.smedi.ismedi.personnel.core.domain.aggregatemodel.Person;
import com.smedi.ismedi.personnel.core.domain.aggregatemodel.model.SimplePerson;

/**
 * @Author: xulinjun
 * @Date: 2021-6-8 11:08
 */
public interface PersonDomainService {
    Person saveInternalPerson(Person person);

    Person saveExternalPerson(Person person);

    void createSimplePerson(SimplePerson simplePerson);

    void editSimplePerson(SimplePerson simplePerson);

    Boolean duplicateEmployeeNum(String employeeNum, Long personId);

    Boolean duplicateIdCard(String idCard, Long personId);

    Boolean duplicateMobile(String mobile, Long personId);

    Boolean validateEmailFormat(String email);

    Boolean validateIdCardFormat(String idCard);

    Boolean validateMobileFormat(String mobile);

    Person queryByIdCard(String idCard);

    Boolean isInternal(Long personId);

    Boolean isExternal(Long personId);

    Boolean isAvailable(Long personId);

    void editPersonStatus(Long personId, boolean enable);

    void deleteByPersonId(Long personId);

    void createAccount(Person person);

    boolean isMobileChanged(Long personId, String newMobile);
}
